{% extends "instructor_portal/course_base.html" %}
{% load instructor_portal_extras %}

{% block content %}

{# Page Heading #}
<h2><img class="icon" src="{{ STATIC_URL }}icon_return_med.png" alt="Return Graded Feedback" />
Return Grade</h2>

{# Detail Information #}
<div>
    Returning Grade for a particular student Submission.<br /><br />
    {# Print Return Grade in Admin link #}
    <img class="icon" src="{{ STATIC_URL }}icon_return_smallest.png" alt="Return Grade in Admin" />
    <b><a href="/admin/student_portal/grade/add/?enrollment={{ enrollment.id }}&amp;assignment={{ assignment.id }}">
        Return Grade using Admin instead?</a></b><br /><br />
    <b>Please Note:</b> Once student receives a Grade, they will no longer be able to modify their Submission on
    Classcomm unless that Grade is removed.  You may modify existing Grades in the
    <b><a href="/instructor/courseindex/{{ course.id }}/roster_tools/">Course Roster Tools</a> ->
    <a href="/instructor/courseindex/{{ course.id }}/roster_tools/grade_report/{{ enrollment.id }}/">
        Grade Report</a>.</b><br />
</div>

{# Print Grade Return Form #}
<form enctype="multipart/form-data" id="return_Grade" method="post" action=".">
<div class="error">
    <h3>{{ form.non_field_errors }}</h3><br />
</div>
<table>
    <tr>
        <th>Student</th>
        <td>{{ enrollment.student }}</td>
    </tr>
    <tr>
        <th>Course</th>
        <td>{{ assignment.course }}</td>
    </tr>
    <tr>
        <th>Assignment</th>
        <td>{{ assignment.name }}</td>
    </tr>
    <tr><td colspan="2">{{ form.points_earned.errors }}</td></tr>
    <tr>
        <th>{{ form.points_earned.label }}<span class="required">*</span></th>
        <td>{{ form.points_earned }} <b>/ Out of:</b> {{ assignment.points_possible }}</td>
    </tr>
    <tr><td colspan="2">{{ form.returned_files.errors }}</td></tr>
    <tr>
        <th>{{ form.returned_files.label }}</th>
        <td>{{ form.returned_files }}</td>
    </tr>
    <tr><td colspan="2">{{ form.comments.errors }}</td></tr>
    <tr>
        <th>{{ form.comments.label }}</th>
        <td>{{ form.comments }}</td>
    </tr>
    <tr><td colspan="2">{% csrf_token %}</td></tr>
    <tr>
        <td></td>
        <td><input type="submit" value="Return Grade" /></td>
    </tr>
</table>
<div class="required">* Denotes Required Field</div>
</form>

{% endblock %}
